package net.whg.java.abstrac;

public class Circle extends Shape{

    private double radius;

    private final static double PI = 3.1415926;

    public Circle(double radius) {
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    @Override
    public void draw() {
        System.out.println("画圆：半径为" + radius);
    }

    @Override
    public void calculateArea() {
        area = PI * radius * radius;
    }
}
